from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    #点击搜索框
    def shoushuokuang(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜商品名称 作者 出版社 ISBN"]')
        ele=self.find_ele(loc)
        return ele

    #输入文字
    def shuru(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    #点击搜索按钮
    def shoushuoann(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().resourceId("com.kongfz.app:id/tvSearch")')
        ele=self.find_ele(loc)
        return ele